package com.anthonybennis.blender.client.pages.bestwebsites;

import java.util.ArrayList;
import java.util.List;

import com.anthonybennis.blender.client.images.ImageClientBundle;
import com.google.gwt.resources.client.ImageResource;

/**
 * 
 * @author abennis
 */
public class BestWebsitesDataGenerator 
{
	private final String BLENDER_CLOUD = "https://cloud.blender.org/";
	private final String BLENDER_GURU = "http://www.blenderguru.com/";
	private final String BLENDER_COOKIE = "https://cgcookie.com/blender/";
	private final String BLENDER_ARTISTS = "http://blenderartists.org/forum/index.php";
	private final String BLENDER_NATION = "http://www.blendernation.com/";
	private final String BLENDER_NEWS = "http://www.blender.org/news/";
	private final String BLENDER_NOOB_TO_PRO = "http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro";
	
	private final ImageClientBundle _imageClientBunde;
	/**
	 * 
	 * @param imageClientBunde
	 */
	public BestWebsitesDataGenerator(ImageClientBundle imageClientBunde)
	{
		_imageClientBunde = imageClientBunde;
	}
	
	/**
	 * 
	 * @return
	 */
	public List<WebpageTileData> createGridData() 
	{
		final List<WebpageTileData> websiteURLList = new ArrayList<WebpageTileData>();

		final ImageResource blenderCloudImageResource = _imageClientBunde.blenderCloud(); 
		final ImageResource blenderGuruImageResource = _imageClientBunde.blenderGuru();
		final ImageResource blenderCookieImageResource = _imageClientBunde.blenderCookie();
		final ImageResource blenderartistImageResource = _imageClientBunde.blenderArtists();
		final ImageResource blenderNationmageResource = _imageClientBunde.blenderNation();
		final ImageResource blenderNewsImageResource = _imageClientBunde.blenderNews();
		final ImageResource blenderNoobToProImageResource = _imageClientBunde.noobToPro();
		
		websiteURLList.add(new WebpageTileData(BLENDER_CLOUD,"Blender Cloud", blenderCloudImageResource));
		websiteURLList.add(new WebpageTileData(BLENDER_GURU,"Blender Guru", blenderGuruImageResource));
		websiteURLList.add(new WebpageTileData(BLENDER_COOKIE,"Blender Cookie", blenderCookieImageResource));
		websiteURLList.add(new WebpageTileData(BLENDER_ARTISTS,"Blender Artists", blenderartistImageResource));
		websiteURLList.add(new WebpageTileData(BLENDER_NATION,"Blender Nation", blenderNationmageResource));
		websiteURLList.add(new WebpageTileData(BLENDER_NEWS,"Blender News", blenderNewsImageResource));
		websiteURLList.add(new WebpageTileData(BLENDER_NOOB_TO_PRO,"Noob to Pro", blenderNoobToProImageResource));
		
		return websiteURLList;
	}
}
